extensiondir = $(EXTENSIONS_DIR)
extension_LTLIBRARIES = libgmailextension.la

libgmailextension_la_SOURCES = \
	base64.c \
	base64.h \
	ephy-gmail-extension.c \
	ephy-gmail-extension.h \
	gmail.c \
	gmail.h \
	gmail-list.c \
	gmail-list.h \
	gmail-status-icon.h \
	gmail-status-icon.c \
	gmail-manager.c \
	my-ssl.c \
	my-ssl.h \
	parser.c \
	parser.h \
	gmail-ui.h \
	gmail-ui.c \
	test.c

libgmailextension_la_CPPFLAGS = \
        -I$(top_srcdir)/include				\
	-DSHARE_DIR=\"$(pkgdatadir)\"			\
	-DEPHY_EXTENSIONS_LOCALEDIR=\"$(datadir)/locale\"  \
	-g -fPIC -DPIC -fvar-tracking -I/usr/include/libxml2 -I/usr/local/include \
	$(AM_CPPFLAGS)

libgmailextension_la_CFLAGS = \
	$(EPIPHANY_DEPENDENCY_CFLAGS)	\
	$(AM_CFLAGS)

libgmailextension_la_LDFLAGS = \
	-module -avoid-version \
	-export-symbols $(top_srcdir)/ephy-extension.symbols \
	-lssl \
	-lnotify \
	$(AM_LDFLAGS)

extensioninidir = $(extensiondir)
extensionini_in_files = gmail.ephy-extension.in.in
extensionini_DATA = $(extensionini_in_files:.ephy-extension.in.in=.ephy-extension)

%.ephy-extension.in: %.ephy-extension.in.in $(extension_LTLIBRARIES)
	sed -e "s|%LIBRARY%|`. ./$(extension_LTLIBRARIES) && echo $$dlname`|" \
	    -e "s|%EXTENSION_DIR%|$(extensiondir)|" \
	$< > $@

@EPIPHANY_EXTENSION_RULE@

CLEANFILES = $(extensionini_DATA)
DISTCLEANFILES = $(extensionini_DATA)

EXTRA_DIST = $(extensionini_in_files)
